
TriggerControl : RippleControl{
	
	getGuiClass{
		^TriggerControlView;
	}
	
	baseSetValue{ 
		arg theValue;
		value = theValue;
	}
	
} 

TriggerControlView : BaseControlView{
	
	var button;
	
	subInit{
		button = SCButton.new(container, Rect(0, 10, 120, 20))
			.states_([[name,Color.grey,Color.white]])
			.canFocus_(false);
	}
	
	createContainer{
		container = SCCompositeView.new(parentContainer, 380@30);
		container.relativeOrigin_(true);}
		
	createActions{|target|
		button.action_({target.setControlValue(name, 1)});	
	}
	
	value_{|val|
		"TriggerControlView.value_".postln;
		RippleButtonBlinker(button, 0.1);
	}
	
	createControlMapEntries{|map|
		"TriggerControlView.createControlMapEntries".postln;
		map.put(name, TriggerControlValueSetter(button));	
	}
	
}
